package com.glut.service.impl;

import com.glut.mapper.ErrorQuestionMapper;
import com.glut.service.ErrorQuestionService;
import com.glut.vo.ErrorQuestion;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Author:shenly
 * @date:2020/05/17
 * @Description:
 */
@Service
public class ErrorQuestionServiceImpl implements ErrorQuestionService {

    @Autowired
    ErrorQuestionMapper errorQuestionMapper;

    /**
     * 1. 查询所有错题的信息
     * @param
     * @return
     */
    @Override
    public List<ErrorQuestion> selectAllErrorQ() {
        return errorQuestionMapper.selectAllErrorQ();
    }

    /**
     * 根据条件查询错题信息
     * @return
     */
    @Override
    public ErrorQuestion selectErrorQById(ErrorQuestion errorQuestion){
        return errorQuestionMapper.selectErrorQById(errorQuestion);
    }


    /**
     * 2.插入错题信息
     * @param errorQuestion
     * @return
     */
    @Override
    public int insertErrorQuestion(ErrorQuestion errorQuestion) {
        return errorQuestionMapper.insertErrorQuestion(errorQuestion);
    }

    /**
     * 3.删除错题信息
     * @param errorQuestion
     * @return
     */
    @Override
    public int deleteErrorQuestion(ErrorQuestion errorQuestion){
        return errorQuestionMapper.deleteErrorQuestion(errorQuestion);
    }
}
